<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateOrderAddressTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_address', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('user_id')->comment("用户id");
            $table->string('receiver_name',50)->comment("收货人姓名");
            $table->string('receiver_phone',20)->comment("收货人手机号");
            $table->string('province',20)->comment("收货人省份");
            $table->string('city',20)->comment("收货人城市");
            $table->string('district',20)->comment("收货人区/县/镇");
            $table->string('committee',20)->comment("收货人村委会");
            $table->string('detail',200)->comment("收货人详细地址（村，门牌号）");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order_address');
    }
}
